package net.yc.imalachat.push.TryMVP;

import android.text.TextUtils;

/**
 * @author:0.2℃
 * @date： 2021-12-18 09:21
 * @Description ：
 */
public class Presenter implements IPresenter {
    private IView mView;

    public Presenter(IView view) {
        mView = view;
    }

    @Override
    public void search() {
        String inputString = mView.getInputString();
        if (TextUtils.isEmpty(inputString)) {
            // 为空直接返回
            return ;
        }
        int hashcode = inputString.hashCode();
        IUserService service = new UserService();
        String result = "Result" + service.search(hashcode);
        //

        mView.setResultString(result);
    }

}
